{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "7865de7b-dc93-4394-b757-504485bf3f6b",
   "metadata": {},
   "source": [
    "# 笔记"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a990351b-48bd-4daf-a7ed-9a0008ae0183",
   "metadata": {},
   "source": [
    "# 1.\t改变盘符 C:, D:, E:, F:…., \n",
    "D:<回车>\n",
    "    (base)D:\\>\n",
    "# 2.\tC:\n",
    "# 3.\tcd<回车> - 检查当前的目录 \n",
    "# 4.\tcd<sp>文件夹的名字\n",
    "   change directory\n",
    "d:\n",
    "cd \\work\n",
    "# 5.\tmake directory\n",
    "md<sp>wangfeng\n",
    "D:\\> md d:\\work\\wangfeng\\1\n",
    "\n",
    "cd d:\\work\\wangfeng\\1\n",
    "\n",
    "# 6.\tremove directory\n",
    "rd<sp>wangfeng\n",
    "# 7.\techo<sp>“I love you” > 1.txt\n",
    "# 8.\tdir – 列出所有的文件\n",
    "* 表示所有的组合\n",
    "dir *.*\n",
    "# 9.\ttype<sp>文件名.扩展名\n",
    "# 10.\tcopy<sp> <源文件名> <目标文件名>\n",
    "copy 1.txt 2.txt\n",
    "\t\n",
    "绝对路径\n",
    "copy d:\\work\\4.dat d:\\work\\wangfeng\\1\\5.dat\n",
    "\n",
    "相对相径\n",
    "copy 4.dat .\\wangfeng\\1\\5.dat\n",
    "\n",
    "# 11 del  (DELETE)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "11125985-b9ab-415b-96a3-ef47e39d0871",
   "metadata": {},
   "source": [
    "# git常用命令\n",
    "# git status\n",
    "# git commit-m\"\"\n",
    "# git push"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e446dfac-bad3-4eb4-b18b-1a426a42cfe0",
   "metadata": {},
   "source": [
    "# python常用命令\n",
    "# 字符串str：\"hello\" 或 'world'\n",
    "# 数值：整数int、浮点数float、复数complex\n",
    "# 布尔值bool：True 或 False\n",
    "# 列表list：[1, 2, 3]可变\n",
    "# 元组tuple：(1, 2, 3)不可变\n",
    "# 字典dict：{\"name\": \"Bob\", \"age\": 25}\n",
    "# 集合set：{1, 2, 3}\n",
    "# 算术运算符：+、-、*、/（除法）、//（整除）、%（取余）、**（幂）\n",
    "# 比较运算符：==、!=、>、<、>=、<=\n",
    "# 逻辑运算符：and、or、not\n",
    "# 赋值运算符：=、+=、-= 等\n",
    "# for循环\n",
    "# while循环\n",
    "# def函数\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2e757a83-8cb6-4c35-966d-75c709fd0b55",
   "metadata": {},
   "source": [
    "# 第二次作业"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "08f38101-d4e6-497a-a23e-8c53355050a5",
   "metadata": {},
   "source": [
    "# python变量命名\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "15a7d57a-741a-405f-bd64-6570d5384315",
   "metadata": {},
   "source": [
    "* 只能包含字母、数字和下划线\n",
    "* 不能以数字开头\n",
    "* 区分大小写\n",
    "* 不能使用 Python 关键字\n",
    "* 建议使用小写字母和下划线\n",
    "* 避免使用单下划线和双下划线开头的特殊命名\n",
    "* 变量名应具有描述性"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f1ab120f-96d1-45d8-9aeb-7e92a84b7fb9",
   "metadata": {},
   "source": [
    "# python运算符\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f37d9deb-bb50-4fc7-a5b8-8e7ca990ca41",
   "metadata": {},
   "source": [
    "* +，-，*，/，//，%，**\n",
    "* +=，-=，*=，/=，//=，%，**=\n",
    "* ==，！=，>,<,>=,<=\n",
    "* and,or,not"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ba1df183-5ab1-4e6a-95cf-0642718e9f54",
   "metadata": {},
   "source": [
    "# python变量类型\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a6465fe7-93a9-4fd7-9e12-6ff7c1b12646",
   "metadata": {},
   "source": [
    "* 整数（int）,age=23\n",
    "* 浮点数（float）,money=0.1\n",
    "* 字符串（str）,\"i love you\"\n",
    "* 布尔值（bool）,ture or false\n",
    "* 列表（list）,[1,2,3]\n",
    "* 元组（tuple）,有序不可变,(19,20)\n",
    "* 字典（dict）,无序键值对集合，用key访问value，person= {\n",
    "    \"name\": \"Bob\",\n",
    "    \"age\": 30,\n",
    "    \"is_student\": False｝\n",
    "* 无序的唯一元素集合，用花括号 {} 表示（但没有键值对）自动去除重复元素\n",
    "* 用type()函数看类型\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "672b5fd3-6897-4a1e-bf72-0437bc9a2dd5",
   "metadata": {},
   "source": [
    "# 第三次作业"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "7adde851-1f28-4be3-8d50-f4f77fb60783",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "温度转换工具\n",
      "1. 摄氏度转华氏度\n",
      "2. 华氏度转摄氏度\n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "请选择转换类型(1/2):  2\n",
      "请输入华氏度:  100\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "100 华氏度 = 37.78 摄氏度\n"
     ]
    }
   ],
   "source": [
    "# 摄氏度和华氏度转换程序\n",
    "print(\"温度转换工具\")\n",
    "print(\"1. 摄氏度转华氏度\")\n",
    "print(\"2. 华氏度转摄氏度\")\n",
    "\n",
    "# 获取用户选择\n",
    "choice = input(\"请选择转换类型(1/2): \")\n",
    "\n",
    "if choice == '1':\n",
    "    # 摄氏度转华氏度\n",
    "    celsius_input = input(\"请输入摄氏度: \")\n",
    "    celsius = eval(celsius_input)\n",
    "    fahrenheit = celsius * 9/5 + 32\n",
    "    print(f\"{celsius} 摄氏度 = {fahrenheit:.2f} 华氏度\")\n",
    "elif choice == '2':\n",
    "    # 华氏度转摄氏度\n",
    "    fahrenheit_input = input(\"请输入华氏度: \")\n",
    "    fahrenheit = eval(fahrenheit_input)\n",
    "    celsius = (fahrenheit - 32) * 5/9\n",
    "    print(f\"{fahrenheit} 华氏度 = {celsius:.2f} 摄氏度\")\n",
    "else:\n",
    "    print(\"无效的选择\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d105544c-a21b-4651-8618-c933f1cf5a26",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
